package com.huarui.sale.dao;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.IBaseDao;

import com.huarui.sale.model.Sale;

public interface ISaleDao extends IBaseDao {
	
	Integer getSaleCount(Map<String,Object> queryMap);
	
	List<Sale> getSalePage(Map<String,Object> queryMap);

	List<Map<String,Object>> getSaleIdPage(Map<String,Object> queryMap);
	/**
	 * 根据单据号和公司id查询销售单
	 * @param code  单据号
	 * @param companyId  公司id
	 * @return
	 */
	Sale getSaleByCodeAndCompanyId(String code,int companyId);
	
	
	List<Sale> getSaleByConditions(Map<String,Object> map);
    /**
     * 根据条件查询销售单,以map形式返回
     * @param queryMap
     * @return
     */
	@SuppressWarnings("unchecked")
	List<Map> getSaleForMapByConditions(Map queryMap);

	Sale getSaleById(Map<String, Object> map);

	boolean updateSaleCurrentorId(Map<String, Object> map);

	Integer getSaleIdByOrdersId(Integer orderId);
}
